import { getByID } from "@/db/blog";
export async function GET(request, { params }) {
    params = await params;
    let res = await getByID(params.id);

    const url = new URL(request.url);
    
    return Response.json(
        {
            message: '成功',
            data: res,
            params,
            searchParams: url.searchParams.toString(),
        },
        { status: 200 }
    );
    
}